Conditions | 8 |
Total Lines | 25 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { execute } from "../../compiler/func"; |
||
21 | static run() { |
||
22 | if (this.args && this.args.length) { |
||
23 | if (this.timer_run) { |
||
24 | clearTimeout(this.timer_run); |
||
25 | } |
||
26 | setTimeout(function () { |
||
27 | npm.timer_run = setTimeout(function () { |
||
28 | npm.run(); |
||
29 | }, 3000); |
||
30 | }, 200); |
||
31 | if (this.running) { |
||
32 | return; |
||
33 | } |
||
34 | var args = this.args[0]; |
||
35 | if (typeof args == "object") { |
||
36 | for (const key in args) { |
||
37 | if (args.hasOwnProperty(key)) { |
||
38 | if (typeof key == "string" && typeof args[key] == "string") { |
||
39 | console.log("npm", args); |
||
40 | npm.npm([key, args[key]]); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 | this.args.shift(); |
||
46 | } |
||
54 |